package com.sttg.csp.registration.service;

import java.util.List;
import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.sttg.csp.common.exception.BizException;
import com.sttg.csp.common.service.LoginService;
import com.sttg.csp.common.util.paged.PagedList;
import com.sttg.csp.registration.dao.LogManageDAO;

public class LogManageService {

	/**
	 * Logger for this class
	 */
	private final Log logger = LogFactory.getLog(LoginService.class);

	private static final LogManageService instance = new LogManageService();    

	private LogManageDAO logManageDAO = LogManageDAO.getInstance();
	/** 
	 * Private the default constructor.
	 */   
	private LogManageService() {}    
   
	/** 
	 * Static factory methods.
	 */   
	public static LogManageService getInstance() {
		return instance;    
	}    

	public Map queryObject(Map param) throws BizException {
//		String uid = (String) param.get("DP_USER_ID");
//		if (uid == null || "".equals(uid)) {
//			throw new BizException("DP userid can't null");
//		}
//		return logManageDAO.findBDAdminByUserID(uid);
		return null;
	}
	
	public void queryPagedList(Map param, PagedList pagedRecords) throws BizException {
		logManageDAO.queryLogPagedList(param, pagedRecords);
	}
	
	/**
	 * @param param will save the Log info
	 * @throws BizException
	 */
	public void doInsert(Map param) throws BizException {
		logManageDAO.doInsertLog(param);
	}
	
	/**
	 * @param param will delete the Log info
	 * @throws BizException
	 */
	public void doDelete(Map param) throws BizException {
		logManageDAO.doDeleteLog(param);
	}
}
